<?php /* Smarty version 2.6.18, created on 2016-12-08 16:42:08
         compiled from disease/week.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">因病缺课周报表</p>
                </div>
                   <div class="box-body">
                    <div class="col-sm-3 form-group">
                              <label for="inputPassword3" class="col-sm-4 control-label" style="padding:0; font-weight:500;">
                                   学年学期：
                              </label>
                              <div class="input-group col-md-8 col-xs-12">
                                   <select class="form-control" style="padding:0;"id="semester_id" name="semester_id">
								   <option value="">请选择</option>
								   <?php $_from = $this->_tpl_vars['semester_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                          <option value="<?php echo $this->_tpl_vars['value']['semester_id']; ?>
"<?php if ($this->_tpl_vars['value']['semester_id'] == $this->_tpl_vars['semester_id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['value']['semester_name']; ?>
</option>
                                   <?php endforeach; endif; unset($_from); ?>
                                    </select>
                              </div> 
                       </div>
                       <div class="col-sm-3 form-group">
                              <label for="inputPassword3" class="col-sm-3 control-label text-right" style="padding:0; font-weight:500;">
                                   周次：
                              </label>
                              <div class="input-group col-sm-5 col-xs-12" style="float:left; margin-right:6px;">
                                    <select class="form-control" id="semester_week" name="semester_week">
                                        <?php $_from = $this->_tpl_vars['week_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
									  <option value="<?php echo $this->_tpl_vars['value']['week_number']; ?>
"<?php if ($this->_tpl_vars['value']['week_number'] == $this->_tpl_vars['semester_week']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['value']['week_number']; ?>
</option>
								  <?php endforeach; endif; unset($_from); ?>
                                    </select>
                              </div>
							  
							  <input type="hidden" name="a" value="disease.weeklist">
                              <button type="submit" class="btn btn-primary">确 定</button>
                       </div>
                       <div style="clear:both;"></div>
     
                   <h4 class=" text-center"><?php echo $this->_tpl_vars['semester_data']['semester_name']; ?>
学生因病缺课主要症状每周汇总表</h4>
                   <p class="text-center"> 第<?php echo $this->_tpl_vars['semester_week']; ?>
周（<?php echo $this->_tpl_vars['semester_time']['start_time']; ?>
至<?php echo $this->_tpl_vars['semester_time']['end_time']; ?>
）</p>
                   <span>地区类别：<?php echo $this->_tpl_vars['baseset_data']['baseset_registered']; ?>
</span><span style=" margin-left:50px;">学校类型：<?php echo $this->_tpl_vars['baseset_data']['baseset_area']; ?>
</span>
                   <p style="margin-top:10px;">全校学生应出勤人数：男生<?php echo $this->_tpl_vars['man_count']['count']; ?>
人，女生<?php echo $this->_tpl_vars['woman_count']; ?>
人，合计<?php echo $this->_tpl_vars['student_count']['count']; ?>
人。  学校因病缺课率：<?php echo $this->_tpl_vars['percent']; ?>
</p>
                   
                      <table class="table table-bordered"  id="mytable">
                                    <tr>
                                        <td rowspan="3">年级</td>
                                        <td rowspan="2" colspan="2">因病缺课人数</td>
                                        <td colspan="14" align="center">因病缺课主要症状人数</td>
                                    </tr>
                                     <tr>
									 <?php $_from = $this->_tpl_vars['disease_ini']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <td colspan="2"><?php echo $this->_tpl_vars['value']; ?>
</td>
									 <?php endforeach; endif; unset($_from); ?>
                                    </tr>
                                    <tr>
                                        <td>男</td>
                                        <td>女</td>
									<?php $_from = $this->_tpl_vars['disease_ini']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <td>男</td>
                                        <td>女</td>
									<?php endforeach; endif; unset($_from); ?>
                                    </tr>
									<?php $_from = $this->_tpl_vars['grade_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <tr>
                                        <td><?php echo $this->_tpl_vars['value']['grade_name']; ?>
</td>

                                        <td><?php echo $this->_tpl_vars['value']['boy']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['girl']; ?>
</td>
										<?php $_from = $this->_tpl_vars['value']['all']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
                                        <td><?php echo $this->_tpl_vars['v']; ?>
</td>
										<?php endforeach; endif; unset($_from); ?>
                                    </tr>
									<?php endforeach; endif; unset($_from); ?>
                        </table>
                        <div class="form-group">
                           <p>备注：<?php echo $this->_tpl_vars['explain_data']['explain_content']; ?>
</p>
                        </div>
				   </div><!--box-body -->
 
               </form>
			   <div class="box-footer" style="border-top:0px;">
					<?php echo $this->_tpl_vars['page']; ?>

			   </div> 
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
<!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script type="text/javascript">

        $(document).ready(function () {
            
            $("#semester_id").change(function () {		
                if ($(this).val() == "-1") {
					$("#industr").remove(); return; 
					}
                else {
			var timestamp = new Date().getTime();
			$.ajax({
			url:"index.php?a=semester.weekjson",
			type:"get",
			data: "semester_id=" + $("#semester_id").find("option:selected").val() + "&timestamp=" + timestamp,
			dataType:"json",
			success:function(msg){
			   
					//实例2个字符串变量来拼接下拉列表
					var industr = "";
					//使用jquery解析json中的数据
					$.each(msg, function (n, value) {
						industr += ("<option value=\"" + value.week_number + "\">" + value.week_number);
						industr += ("</option>");
					});

					$("#semester_week").html(industr);			   			   
			}
			});					

                }

            });

        });
</script>